package rsvp.util;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author ksz
 *
 */
public class TimeRange {
	
	// the time range, maybe do it with bean access?
	public Date dtStart;
	public Date dtEnd;

	public long getDuration()
	{
		return dtEnd.getTime() - dtStart.getTime();
	}

	public String getTimeRange_asString()
	{
		final SimpleDateFormat sdf = new SimpleDateFormat(
															"yyyy-MM-dd HH:mm:ss.SS");
		
		return "[" + sdf.format(dtStart) + " - " + sdf.format(dtEnd) + "]";
	}
}
